<!Doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>大旺福--{$title}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/assets/layui/css/global.css" media="all">
</head>
<body>
<div class="layui-layout layui-layout-admin">

    <!-- header start -->
    {include file="layout/header.html"}
    <!-- header end -->

    <!-- nav start-->
    {include file="layout/nav.html"}
    <!-- nav end-->

    <!-- main start -->
    <div class="layui-body site-demo">
        <div class="layui-main">
            <fieldset class="layui-elem-field layui-field-title">
                <legend>{$title}</legend>
            </fieldset>
            <div class="site-block">
                <form class="layui-form" action="/coupons/submit/" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">优惠券标题:</label>
						<div class="layui-input-block">
							<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">使用范围</label>
						<div class="layui-input-block">
						  <input type="radio" name="use-range" value="1" title="全品类" checked="" lay-filter="use-range">
						  <input type="radio" name="use-range" value="2" title="多品类" lay-filter="use-range">
						  <input type="radio" name="use-range" value="3" title="多产品" lay-filter="use-range">
						</div>
					</div>
					<div class="layui-form-item category-select" style="display: none;">
						<label class="layui-form-label">选择分类</label>
						<div class="layui-input-block">
							<input type="hidden" name="categroy_id" value="0" lay-verify="categroy">
							<button type="button" class="layui-btn add-category" style="margin-top:5px;"><i class="layui-icon">&#xe608;</i> <span>选择分类</span></button><span style="color: red;">  *请选择二级分类</span>
							<div class="category-list layui-clear site-block layui-hide" style="padding:10px;">
								<ul id="category-tree" class="layui-box layui-tree" style="margin-bottom:10px;"></ul>
							</div>
							<div class="category-selected-list layui-clear site-block" style="padding:10px;">
							</div>
						</div>
					</div>
					<div class="layui-form-item product-select" style="display: none;">
						<label class="layui-form-label">选择产品</label>
						<div class="layui-input-block">
							<input type="hidden" id="productId" name="product_id" value="0" lay-verify="product">
							<button type="button" class="layui-btn add-product" style="margin-top:5px;"><i class="layui-icon">&#xe608;</i> <span>选择产品</span></button>
							<div id="productSelectedList" class="product-selected-list layui-clear site-block" style="padding:10px;">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">优惠券面值:</label>
						<div class="layui-input-block">
							<input type="text" name="face-value" lay-verify="facevalue" autocomplete="off" placeholder="请输入优惠券抵扣金额" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">最低消费金额:</label>
						<div class="layui-input-block">
							<input type="text" name="minimum-charge" lay-verify="minimumcharge" autocomplete="off" placeholder="请输入最低消费金额(0表示不限制)" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">可兑换金额:</label>
						<div class="layui-input-block">
							<input type="text" name="exchangeable-amount" lay-verify="exchangeableamount" autocomplete="off" placeholder="请输入优惠券可兑换金额(大于0)" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">发放数量:</label>
						<div class="layui-input-block">
							<input type="text" name="issue-number" lay-verify="issuenumber" autocomplete="off" placeholder="请填写优惠券发放数量(大于0的整数)" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item layui-form-text">
						<label class="layui-form-label">使用规则:</label>
						<div class="layui-input-block">
							<textarea class="layui-textarea layui-hide" name="content" lay-verify="content" id="rule_content_editor"></textarea>
						</div>
					</div>
					<div class="layui-form-item">
					  <label class="layui-form-label">领取方式</label>
					  <div class="layui-input-block">
					    <input type="radio" name="handout-way" value="1" title="会员自助领取" checked="">
					    <input type="radio" name="handout-way" value="2" title="新会员自动发放">
					    <input type="radio" name="handout-way" value="4" title="新会员随机发放" >
					    <input type="radio" name="handout-way" value="5" title="充值送" >
					    <input type="radio" name="handout-way" value="6" title="特定活动使用" >
					  </div>
					</div>					
					<div class="layui-form-item">
						<label class="layui-form-label">商品图片</label>
						<div class="layui-input-inline">
							<input type="file" name="file" lay-type="images" class="layui-upload-file">
						</div>
						<div class="layui-input-inline" id="thumbnails">
							<input type="hidden" id="coupon_icon" value="" name="coupon_icon">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">有效期:</label>
						<div class="layui-input-inline">
							<input class="layui-input" lay-verify="startdate" placeholder="开始日" id="LAY_demorange_s" name="start-date" readonly>
						</div>
						<div class="layui-input-inline">
							<input class="layui-input" lay-verify="enddate" placeholder="截止日" id="LAY_demorange_e" name="end-date" readonly>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
						<button class="layui-btn" lay-submit="" lay-filter="save">立即提交</button>
						</div>
					</div>					
                	</form>
            </div>
        </div>
    </div>
    <!-- main end -->
</div>


{include file="layout/footerJs.html"}
<script src="/assets/layui/js/coupons/issuing.js"></script>
</body>
</html>